import redis.clients.jedis.Jedis;

import java.util.HashMap;
import java.util.Map;

public class Demo {
    public static void main(String[] args) {
        //连接本地Redis服务
        Jedis jedis=new Jedis("redis://192.168.198.134:6379");
        //使用密码登录
        jedis.auth("ok");
//        System.out.println(jedis.ping());
//        System.out.println(jedis.get("usera"));
//        System.out.println(jedis.hget("aaa","aa1"));
//        System.out.println(jedis.hgetAll("aaa"));
//        Map mp=new HashMap<>();
//        mp.put("b1","kk1");
//        mp.put("b2","kkk2");
    }
}

